@echo off
chcp 936 >nul
echo Starting debug mode...
echo.

:: Compile common module
echo [DEBUG] Compiling common-module...
cd /d F:\shopping\common-module
echo [DEBUG] Current directory: %CD%
mvn clean install -DskipTests
echo [DEBUG] Maven exit code: %ERRORLEVEL%
if errorlevel 1 (
    echo [DEBUG] Compilation failed for common-module
    pause
    exit /b 1
)

echo [DEBUG] common-module compilation successful, continuing...
echo.

:: Compile auth-service
echo [DEBUG] Compiling auth-service...
cd /d F:\shopping\auth-service
echo [DEBUG] Current directory: %CD%
mvn clean package -DskipTests
echo [DEBUG] Maven exit code: %ERRORLEVEL%
if errorlevel 1 (
    echo [DEBUG] Compilation failed for auth-service
    pause
    exit /b 1
)

echo [DEBUG] auth-service compilation successful!
echo Debug completed successfully!
pause